Skip to content

SLOP-376: port legacy Revision class to RevisionStore (removed in MW 1.39) - #11

Open
tosfos wants to merge 1 commit into
masterfrom
SLOP-376-port-revision-class
Open

SLOP-376: port legacy Revision class to RevisionStore (removed in MW 1.39)#11
tosfos wants to merge 1 commit into
masterfrom
SLOP-376-port-revision-class

Conversation

@tosfos

@tosfos tosfos commented Aug 23, 2026

Copy link
Copy Markdown

Summary

The Revision class was removed in MediaWiki 1.39 (deprecated since 1.31). Six live call sites fatal on 1.39 with Class 'Revision' not found:

  • includes/ReviewHandler.php:156,167Revision::newFromRow(...)->getPrevious(), Revision::newFromTitle(...)
  • specials/SpecialPendingReviews.php:308,476,497,915 — same patterns

Ported to the service-locator equivalents:

  • Revision::newFromRow( $row )MediaWikiServices::getInstance()->getRevisionStore()->newRevisionFromRow( $row )
  • ->getPrevious()RevisionStore::getPreviousRevision( $record )
  • Revision::newFromTitle( $title )RevisionStore::getKnownCurrentRevision( $title ) (null-guarded before ->getId())

Verification

  • php -l clean on php:7.4-cli and php:8.2-cli for both files.
  • Harness with a stubbed RevisionStore mirroring 1.39 semantics: previous-revision lookup, first-view fallback to current revision, and orphan-row fallback all return the expected IDs on both PHP versions.
  • Repo-wide grep confirms zero remaining live Revision:: references (commented sites untouched).

Closes SLOP-376.

…1.39)

Revision::newFromRow/newFromTitle and the Revision class itself were
removed in MediaWiki 1.39. Port all six call sites:
- newFromRow -> RevisionStore::newRevisionFromRow
- ->getPrevious() -> RevisionStore::getPreviousRevision
- newFromTitle -> RevisionStore::getKnownCurrentRevision
@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 43578f1f-dd02-432f-8cd3-4fa8baa20db1


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant